<?php


namespace app\common\business;


use app\common\model\BaseModel;
use app\common\model\ServiceItem;
use think\exception\HttpException;

class Common
{
    public function getServiceInfoById(string $id)
    {
        //根据服务项id获取服务项内容
        $serviceInfo = (new ServiceItem())->where("id", "=", $id)->find();
        if (empty($serviceInfo)) {
            throw new HttpException("服务项目不存在");
        }
        return $serviceInfo;
    }
}